package basicutil.pipeline;

/**
 * 基础数据消息实现
 */
public class  DataMessage   {
    private final DataType type;
    private final Object data;
    private final long timestamp;
    private final String sourceId;

    public DataMessage(DataType type, Object data, String sourceId) {
        this.type = type;
        this.data = data;
        this.sourceId = sourceId;
        this.timestamp = System.currentTimeMillis();
    }

    public DataType getType() {
        return type;
    }

    public Object getData() {
        return data;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public String getSourceId() {
        return sourceId;
    }
}
